<!--------------------------------------------------------------
>//	Company:	HTHK
>//	NAME:	    ProjectSearch.jsp
>//	TITLE:	    The maintence of project
>//	FUNCTION:	The search page to project
>//	BY:	        Kodak Xu
>//	DATE:	    09/12/2003
>//	Update_date:	16-01-2004
>//	Update_by:	Poly Li
>//	update_date:	2004-2-13 17:36
>//	update_by:	Beyes Xia
>// --------------------------------------------------------------
>// MODIFICATION HISTORY
>// --------------------------------------------------------------
>//	CR Log #:  99999  BY:  XXXX   DATE:  dd/mm/yyyy
>//	ERROR:	XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>//	FIX:	XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>// --------------------------------------------------------------
-->

<%@ include file="../tssheader.jsp" %>
<%@ page import="tss.project.*" %>
<%@ page import="tss.options.*" %>
<%    
	YearOptions year = new YearOptions();
	MonthOptions month = new MonthOptions();
	ProjectCategoryOptions pco = new ProjectCategoryOptions();
	GroupOptions go = new GroupOptions();
%>
<script language="JavaScript1.1">
	
	
	function formValidation() 
	{
        	var d1 = fm.year_from.value;
		var d2 = fm.month_from.value;	
        if ((d1.length!=0 && d2.length==0) || (d1.length==0 && d2.length!=0))
		{
			alert("Year and Month should be related!");
			return false;
		}	
		fm.submit(); 
    }

</script>
<body>
<h2>Project Maintenance</h2>
<form id=fm method=post action='<%=contextPath%>/servlet/tss.project.ProjectSearch'>
<table cols=2 >

<tr>
  <td>Project Name:</td>  
  <td>&nbsp;</td>
  <td><input type=text name='project_name' size=20 maxlength=20></td>
</tr>

<tr>
  <td>Project Category Name:</td> 
  <td>&nbsp;</td>
  <td>
	  <select name='project_category' style="width=180;">
		<%=pco.getOptions("")%>
	  </select>
  </td>
</tr>

<tr>
  <td>Project Group Name:</td> 
  <td>&nbsp;</td>
  <td>
	  <select name='project_group' style="width=180;">
		<%=go.getOptions("")%>
	  </select>
  </td>
</tr>

<tr>
  <td>Effective Range:</td>
  <td>&nbsp;</td>
  <td nowrap>From
	  <select name='year_from'>
	   <%=year.getOptions("")%>
	  </select>
  YYYY
  </td>
  <td nowrap>
	  <select name='month_from'>
	    <%=month.getOptions("")%>
	  </select>
  MM
  </td>
</tr>

<tr>
  <td>&nbsp;</td>
  <td></td>
  <td nowrap>To&nbsp;&nbsp;&nbsp;&nbsp;
	  <select name='year_to'>
	  <%=year.getOptions("")%>
	  </select>
  YYYY
  </td>
  <td nowrap>
	  <select name='month_to'>
	  <%=month.getOptions("")%>
	  </select>
  MM
  </td>
</tr>

<tr>
	<td>Chargeable:</td>
	<td>&nbsp;</td>
	<td>
		<select name="chargeable_ind">
			<option value="">All</option>
			<option value="Y">Yes</option>
			<option value="N">No</option>
		</select>
	</td>
</tr>

</table>
<br>
<hr>
<p>
  <INPUT type=button value='New' onclick=javascript:location.href="<%=contextPath%>/tss/project/Project.jsp?formAction=Create" >
  <INPUT type=button value='Search' onclick="formValidation()">
  <INPUT type=reset  value='Cancel' >
</p>
</form>
<%@ include file="../tssfooter.jsp" %>
</body>
</html>